home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
machack
/
Hacks96
/
MenuMadness.sit
/
MenuMadness
/
Source
/
C Source
/
Main.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-06-21
|
960b
|
69 lines
#include <A4Stuff.h>
#include <Traps.h>
#include "MenuSelect.h"
//#include "ShowIconFamily.h"
OSErr InstallPatches(void);
pascal void main(void);
pascal long MenuSelectPatch(Point where);
enum{kINITID = 0 };
pascal void main(void)
{
long oldA4;
Handle h = Get1Resource('INIT', kINITID);
OSErr result = noErr;
if (h == nil)
return;
DetachResource(h);
oldA4 = SetCurrentA4();
result = InstallPatches();
SetA4(oldA4);
/*if (result != noErr)
ShowIconFamily(129);
else
ShowIconFamily(128);*/
}
long gOriginalMenuSelectAddress = 0;
OSErr InstallPatches(void)
{
OSErr result = noErr;
gOriginalMenuSelectAddress = (long) GetToolTrapAddress(_MenuSelect);
SetToolTrapAddress( (UniversalProcPtr)MenuSelectPatch, _MenuSelect);
return result;
}
pascal long MenuSelectPatch(Point where)
{
long oldA4 = SetCurrentA4();
long result = AltMenuSelect(where, kFXSlide, kFXZoomIn);
SetA4(oldA4);
return result;
}